package com.bifang.core.dao.model;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * app点击情况日志
 *
 * @author chenzh
 * @since 2021-03-08
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("OPLOG_APP")
@ApiModel(value = "OplogApp对象", description = "app点击情况日志")
// @KeySequence(value = "SQ_OPLOG_APP_ID", clazz = Long.class)
public class OplogApp extends Model<OplogApp> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @TableId(value = "OPLOG_APP_ID", type = IdType.INPUT)
    private String oplogAppId;

    @ApiModelProperty(value = "服务事项编码")
    @TableField("SERVICE_CODE")
    private String serviceCode;

    @ApiModelProperty(value = "服务事情名称")
    @TableField("SERVICE_NAME")
    private String serviceName;

    @ApiModelProperty(value = "访问人")
    @TableField("USER_ID")
    private String userId;

    @ApiModelProperty(value = "访问时间")
    @TableField(value = "CREATE_TIME", fill = FieldFill.INSERT)
    private Date createTime;

    @ApiModelProperty(value = "业务年月")
    @TableField("DATE_YM")
    private Integer dateYm;

    @ApiModelProperty(value = "日期")
    @TableField("DATE_DAY")
    private Integer dateDay;

    @ApiModelProperty(value = "菜单id")
    @TableField("MENU_ID")
    private String menuId;

    @ApiModelProperty(value = "链接地址")
    @TableField("LINK_URL")
    private String linkUrl;

    @ApiModelProperty(value = "链接类型：router 内部路由 h5 第三方H5 weixin 第三方微信小程序")
    @TableField("LINK_TYPE")
    private String linkType;

    @ApiModelProperty(value = "内部路由路径")
    @TableField("LINK_PATH")
    private String linkPath;

    @ApiModelProperty(value = "内部路由名")
    @TableField("LINK_NAME")
    private String linkName;

    @ApiModelProperty(value = "菜单名称")
    @TableField("MENU_TITLE")
    private String menuTitle;

    @ApiModelProperty(value = "菜单类型：常用应用  政策咨询 查询")
    @TableField("MENU_TYPE")
    private String menuType;

    @ApiModelProperty(value = "登入类型：微信 单点登录")
    @TableField("LOGIN_TYPE")
    private String loginType;

    @ApiModelProperty(value = "登入方设备类型 pc app")
    @TableField("EQUIPMENT_TYPE")
    private String equipmentType;

    @ApiModelProperty(value = "登入token")
    @TableField("ACCESS_TOKEN")
    private String accessToken;

    @ApiModelProperty(value = "登入方设备id")
    @TableField("EQUIPMENT_ID")
    private String equipmentId;

    @ApiModelProperty(value = "系统版本号")
    @TableField("VERSION_")
    private String version;

    @ApiModelProperty(value = "系统编号")
    @TableField("SYSTEM_CODE")
    private String systemCode;

    @ApiModelProperty(value = "系统名称")
    @TableField("SYSTEM_NAME")
    private String systemName;

    @ApiModelProperty(value = "应用名称")
    @TableField("APP_NAME")
    private String appName;

    @ApiModelProperty(value = "是否点击菜单主服务：0 否 1 是")
    @TableField("MAIN_FLAG")
    private String mainFlag;

    @ApiModelProperty(value = "服务点id")
    @TableField("SERVICE_ID")
    private Long serviceId;

    @ApiModelProperty(value = "人员id")
    @TableField("PERSON_ID")
    private Long personId;

    @ApiModelProperty(value = "人员所属统筹区")
    @TableField("AREA_CODE")
    private String areaCode;

    @ApiModelProperty(value = "服务点所属行政区")
    @TableField("SERVICE_AREA_CODE")
    private String serviceAreaCode;

    @ApiModelProperty(value = "所属组织")
    @TableField("ORG_ID")
    private String orgId;

    @ApiModelProperty(value = "应用id")
    @TableField("CLIENT_ID")
    private String clientId;

    @ApiModelProperty(value = "服务类型")
    @TableField("SERVICE_TYPE")
    private String serviceType;

    @ApiModelProperty(value = "服务类型 中文")
    @TableField("SERVICE_TYPE_NAME")
    private String serviceTypeName;

    @ApiModelProperty(value = "详情名称")
    @TableField("INFO_NAME")
    private String infoName;

    @ApiModelProperty(value = "事项类别（1或2）， 1：访问事项 2：线下服务事项")
    @TableField("TAG")
    private String tag;

    @ApiModelProperty(value = "是否游客")
    @TableField("GUEST_FLAG")
    private String guestFlag;

    @Override
    public Serializable pkVal() {
        return this.oplogAppId;
    }
}
